<?php get_header(); ?>

<div class="narrowcolumn">

<?php if( !is_ads_free() ): ?>
<div style="text-align:center">
<script type="text/javascript"><!--
google_ad_client = "<?php google_pub_id()?>";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "FF1493";
google_color_text = "000000";
google_color_url = "FF1493";
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<?php endif; ?>

<?php
if( file_exists( ABSPATH . WPINC . '/rss.php') )
	require_once(ABSPATH . WPINC . '/rss.php');
else
	require_once(ABSPATH . WPINC . '/rss-functions.php');

$rss_url = 'http://www.flickr.com/services/feeds/photos_public.gne?tags=flowers&format=rss_200';
$rss = @fetch_rss($rss_url);
$items = array_slice($rss->items, 0, 1);
foreach ( $items as $item ) {
	if(preg_match('<img src="([^"]*)" [^/]*/>', $item['description'],$imgUrlMatches)) {
		$imgurl = $imgUrlMatches[1];
             	$imgurl = str_replace("_m.jpg", ".jpg", $imgurl);
        }
	echo '<div id="flickr"><img class="middle" alt="flickr Photo" src="'.$imgurl.'" /></div>';
	}
//echo '</div>';

?>

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
				
	<div class="post" id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php the_content('Read more&#8230;'); ?>

<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Category: <?php the_category(', ') ?> <?php _e('author&#58;'); ?> <a href="<?php the_author_url(); ?>"><?php the_author(); ?></a></p>
	</div>
	<div class="post-date"><?php the_time('F jS, Y') ?> <?php edit_post_link('Edit this entry', '', ''); ?> | <?php _e('comments&#58;'); ?> <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div>

<?php endwhile; ?>

<div class="navigation"><?php posts_nav_link('','','previous page') ?> <?php posts_nav_link('','next page','') ?></div>

<?php else : ?>

	<div class="post">
<h2 class="center">Not Found</h2>
<p>Sorry, but you are looking for something that isn't here.</p>
	</div>

<?php endif; ?>
<div style="text-align:center;margin-top:10px;margin-bottom:10px;">
<script type="text/javascript"><!--
google_ad_client = "<?php google_pub_id()?>";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "FF1493";
google_color_text = "000000";
google_color_url = "FF1493";
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
</div>

<?php get_footer(); ?>